<head>
<meta charset="utf-8">
</head>
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script src="js/upload.js"></script>
<script>
function vs(){
alert("fuck");
}
function getjspath(id){
var jspath=$("input#jspath"+id)[0].value;
if(jspath.length>10){
$("button#btn_setjs"+id)[0].disabled=true;
$("button#btn_upjs"+id)[0].disabled=false;
console.log(jspath);
setjs(jspath);
}
else{
alert("请输入正确的js路径");
}

}
function listall(type){
var json={"type":type,"searchinfo":$("input#miaoshu")[0].value};
console.log(json);
searchall(json);
}
function setjs(jspath){
var s = document.createElement('script');
s.setAttribute('src', jspath);
document.head.appendChild(s);
}
function clearlog(){
$("textarea#log").val('');
}
function deloption(){
var delname =$('select#option_delall')[0].value;
console.log("将要删除:"+delname);
return delname;
}
</script>


<body>
<div style="float:left">
<input type="text" id="adminpwd" placeholder="请输入管理员密码" />
<select id="option_delall">
  <option value ="悬红">悬红</option>
  <option value ="技能">技能</option>
  <option value="装备">装备</option>
  <option value="灯谜">灯谜</option>
  <option value="答题">答题</option>
  <option value="挖宝">挖宝</option>
  <option value="秘境">秘境</option>
  <option value="江湖">江湖</option>
  <option value="地图">地图</option>
  <option value="物品">物品</option>
  <option value="清背包">清背包</option>
  <option value="青龙">青龙</option>
  <option value="隐藏npc">隐藏npc</option>
  <option value="奇侠">奇侠</option>
</select>
<button type="button" onclick="delall()">全部删除</button>

<br><br>

<span style="color:red">0  </span><input id="jspath0" placeholder="输入待提交的悬红js路径"  style="width:300px" value="js/lunjian_npcs.js"><button id="btn_setjs0" type="button" onclick="getjspath(0)">设置js路径</button><button id="btn_upjs0" type="button" disabled=true onclick="uploadsql('悬红')">提交悬红</button><br>

<span style="color:red">1  </span><input id="jspath1" placeholder="输入待提交的技能js路径"  style="width:300px" value="js/lunjian_skills.js"><button id="btn_setjs1" type="button" onclick="getjspath(1)">设置js路径</button><button id="btn_upjs1" type="button" disabled=true onclick="uploadsql('技能')">提交技能</button><br>

<span style="color:red">2  </span><input id="jspath2" placeholder="输入待提交的装备js路径"  style="width:300px" value="js/lunjian_equips.js"><button id="btn_setjs2" type="button" onclick="getjspath(2)">设置js路径</button><button id="btn_upjs2" type="button" disabled=true  onclick="uploadsql('装备')">提交装备</button><br>
<span style="color:red">3  </span><input id="jspath3" placeholder="输入待提交的灯谜js路径"  style="width:300px" value="js/lunjian_dengmis.js"><button id="btn_setjs3" type="button" onclick="getjspath(3)">设置js路径</button><button id="btn_upjs3" type="button" disabled=true onclick="uploadsql('灯谜')">提交灯谜</button><br>

<span style="color:red">4  </span><input id="jspath4" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_questions.js"><button id="btn_setjs4" type="button" onclick="getjspath(4)">设置js路径</button><button id="btn_upjs4" type="button" disabled=true onclick="uploadsql('答题')">提交答题</button><br>
<span style="color:red">5  </span><input id="jspath5" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_wabaos.js"><button id="btn_setjs5" type="button" onclick="getjspath(5)">设置js路径</button><button id="btn_upjs5" type="button" disabled=true onclick="uploadsql('挖宝')">提交挖宝</button><br>
<span style="color:red">6  </span><input id="jspath6" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_mjmaps.js"><button id="btn_setjs6" type="button" onclick="getjspath(6)">设置js路径</button><button id="btn_upjs6" type="button" disabled=true onclick="uploadsql('秘境')">提交秘境</button><br>
<span style="color:red">7  </span><input id="jspath7" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_jhlists.js"><button id="btn_setjs7" type="button" onclick="getjspath(7)">设置js路径</button><button id="btn_upjs7" type="button" disabled=true onclick="uploadsql('江湖')">提交江湖</button><br>
<span style="color:red">8  </span><input id="jspath8" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_maps.js"><button id="btn_setjs8" type="button" onclick="getjspath(8)">设置js路径</button><button id="btn_upjs8" type="button" disabled=true onclick="uploadsql('地图')">提交地图</button><br>
<span style="color:red">9  </span><input id="jspath9" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_things.js"><button id="btn_setjs9" type="button" onclick="getjspath(9)">设置js路径</button><button id="btn_upjs9" type="button" disabled=true onclick="uploadsql('物品')">提交物品</button><br>
<span style="color:red">10 </span><input id="jspath10" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_clearbags.js"><button id="btn_setjs10" type="button" onclick="getjspath(10)">设置js路径</button><button id="btn_upjs10" type="button" disabled=true onclick="uploadsql('清背包')">提交清背包</button><br>
<span style="color:red">11 </span><input id="jspath11" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_qinglongs.js"><button id="btn_setjs11" type="button" onclick="getjspath(11)">设置js路径</button><button id="btn_upjs11" type="button" disabled=true onclick="uploadsql('青龙')">提交青龙</button><br>
<span style="color:red">12 </span><input id="jspath12" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_hidenpcs.js"><button id="btn_setjs12" type="button" onclick="getjspath(12)">设置js路径</button><button id="btn_upjs12" type="button" disabled=true onclick="uploadsql('隐藏npc')">提交隐藏npc</button><br>
<span style="color:red">13 </span><input id="jspath13" placeholder="输入待提交的答题js路径"  style="width:300px" value="js/lunjian_qixiainfos.js"><button id="btn_setjs13" type="button" onclick="getjspath(13)">设置js路径</button><button id="btn_upjs13" type="button" disabled=true onclick="uploadsql('奇侠')">提交奇侠</button><br>

<input  id="miaoshu" placeholder="输入要查询的内容名称（悬红描述，技能名称等）"  style="width:300px"><button type="button" onclick="listall('查询悬红')">查询悬红</button>

<button type="button" onclick="listall('查询技能')">查询技能</button>
<button type="button" onclick="listall('查询答题')">查询答题</button><br>
<button type="button" onclick="listall('查询装备')">查询装备</button>
<button type="button" onclick="listall('查询灯谜')">查询灯谜</button>
<button type="button" onclick="listall('查询挖宝')">查询挖宝</button>
<button type="button" onclick="listall('查询秘境')">查询秘境</button>
<button type="button" onclick="listall('查询江湖')">查询江湖</button>
<button type="button" onclick="listall('查询地图')">查询地图</button>
<button type="button" onclick="listall('查询物品')">查询物品</button><br>
<button type="button" onclick="listall('查询清背包')">查询清背包</button>
<button type="button" onclick="listall('查询青龙')">查询青龙</button>
<button type="button" onclick="listall('查询隐藏npc')">查询隐藏npc</button>
<button type="button" onclick="listall('查询奇侠')">查询奇侠</button>

<br>
</div>

<div>
<button type="button" onclick="clearlog()">清空日志</button><br><br>

<textarea placeholder="日志信息显示在此"  id='log' name="content" style="width: 500px;height: 430px" ></textarea>

</div>

<div id="miaoshutable" style="float:left"></div>

</body>